package com.megaspacevr.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

/**
 * <p>
 * 操作日志表
 * </p>
 *
 * @author yezi
 * @since 2025-06-17
 */
@Getter
@Setter
@ToString
@TableName("operation_logs")
@Schema(name = "OperationLogs", description = "操作日志表")
public class OperationLogs implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @Schema(description = "操作者类型")
    private String userType;

    @Schema(description = "操作者ID（user_token或admin用户名）")
    private String userId;

    @Schema(description = "操作类型")
    private String operationType;

    @Schema(description = "操作描述")
    private String operationDesc;

    @Schema(description = "相关预约ID")
    private Long bookingId;

    @Schema(description = "操作IP")
    private String ipAddress;

    @Schema(description = "浏览器信息")
    private String userAgent;

    private LocalDateTime createdAt;

}
